<?php
/**
 * | @author 李鹏博^life <907215837@qq.com>
 * +----------------------------------------------------------------------
 * | @copyright 2019 - 2019 HQ
 * +----------------------------------------------------------------------
 * | @version $Id: 2019/5/16 17:37 wwwroot memberServer.php 韩威兵^life $
 * +----------------------------------------------------------------------
 */

namespace app\common\common\Server;

use app\common\common\model\oldModel\member\member;


class oldMemberServer
{
    /**
     * 查询公众号用户信息
     * @param $union_id 微信公众平台用户唯一标示
     * @param $mobile 手机号
     */
    public function getOldMember($union_id,$mobile){

        $member = new member();
        $member_uninon_map['union_id'] = $union_id;

        $all_member = $member->allByWhere($member_uninon_map);

        if(empty($all_member)){

            $member_mobile_map['mobile'] = $mobile;
            $all_member = $member->allByWhere($member_mobile_map);
        }
        return $all_member;

    }
}